<script setup lang="ts">
import { ref } from 'vue'

// 导航菜单数据
// const navItems = ref([
//   { title: '首页', link: '/' },
//   { title: '产品', link: '/products' },
//   { title: '解决方案', link: '/solutions' },
//   { title: '关于我们', link: '/about' }
// ])

// 功能特点数据
const features = ref([
  {
    title: '高效性能',
    description: '采用最新技术栈，确保系统运行高效稳定',
    icon: 'i-carbon-flash'
  },
  {
    title: '安全可靠',
    description: '多重安全防护，保障数据传输与存储安全',
    icon: 'i-carbon-security'
  },
  {
    title: '简单易用',
    description: '直观的操作界面，快速上手无障碍',
    icon: 'i-carbon-touch-1'
  },
  {
    title: '灵活扩展',
    description: '模块化设计，支持功能自由扩展',
    icon: 'i-carbon-expand'
  }
])

// 产品展示数据
const products = ref([
  {
    title: '企业管理系统',
    description: '一站式企业级解决方案',
    image: 'https://cdn.pixabay.com/photo/2022/09/22/07/50/fluctuation-7471864_640.png'
  },
  {
    title: '数据分析平台',
    description: '智能数据分析与决策支持',
    image: 'https://cdn.pixabay.com/photo/2023/09/28/07/25/technology-8280863_1280.jpg'
  },
  {
    title: '协同办公系统',
    description: '提升团队协作效率',
    image: 'https://cdn.pixabay.com/photo/2020/06/17/06/11/virus-5308335_640.jpg'
  }
])
</script>

<template>
  <div class="home-container">
    <!-- Hero区域 -->
    <section class="hero-section">
      <div class="hero-content">
        <h1>下一代企业级解决方案</h1>
        <p>助力企业数字化转型，驱动业务创新发展</p>
        <button class="primary-btn">立即体验</button>
      </div>
    </section>

    <!-- 功能特点 -->
    <section class="features-section">
      <h2>核心优势</h2>
      <div class="features-grid">
        <div v-for="feature in features" :key="feature.title" class="feature-card">
          <div class="feature-icon" :class="feature.icon"></div>
          <h3>{{ feature.title }}</h3>
          <p>{{ feature.description }}</p>
        </div>
      </div>
    </section>

    <!-- 产品展示 -->
    <section class="products-section">
      <h2>产品展示</h2>
      <div class="products-grid">
        <div v-for="product in products" :key="product.title" class="product-card">
          <img :src="product.image" :alt="product.title" />
          <h3>{{ product.title }}</h3>
          <p>{{ product.description }}</p>
        </div>
      </div>
    </section>

    <!-- 底部区域 -->
    <footer class="footer">
      <div class="footer-content">
        <div class="footer-section">
          <h4>联系我们</h4>
          <p>电话：400-123-4567</p>
          <p>邮箱：contact@example.com</p>
        </div>
        <div class="footer-section">
          <h4>关注我们</h4>
          <div class="social-links">
            <a href="#" class="i-carbon-logo-wechat"></a>
            <a href="#" class="i-carbon-logo-weibo"></a>
          </div>
        </div>
      </div>
      <div class="footer-bottom">
        <p>© 2024 Company Name. All rights reserved.</p>
      </div>
    </footer>
  </div>
</template>

<style scoped>
.home-container {
  width: 100%;
  min-height: 100vh;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: #1e88e5;
}

/* Hero区域样式 */
.hero-section {
  height: 100vh;
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.primary-btn {
  background: white;
  color: #1e88e5;
  border: none;
  padding: 1rem 2rem;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s;
}

.primary-btn:hover {
  transform: translateY(-2px);
}

/* 功能特点样式 */
.features-section {
  padding: 5rem 1rem;
  background: #f5f5f5;
}

.features-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 3rem;
  color: #1e88e5;
  margin-bottom: 1rem;
}

/* 产品展示样式 */
.products-section {
  padding: 5rem 1rem;
}

.products-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h3 {
  padding: 1rem;
  margin: 0;
  color: #333;
}

.product-card p {
  padding: 0 1rem 1rem;
  color: #666;
}

/* 底部区域样式 */
.footer {
  background: #1e88e5;
  color: white;
  padding: 3rem 1rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  font-size: 1.5rem;
}

.social-links a {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .features-section h2,
  .products-section h2 {
    font-size: 2rem;
  }
}
</style>
